package com.slipper.common.feign;

import java.util.HashMap;
import java.util.Map;

import com.slipper.common.util.JwtUtil;

public class FeignService {
    private final String appName;

    public FeignService(String appName) {
        this.appName = appName;
    }
    
    public String getToken() {
        Map<String, Object> dataMap = new HashMap<>();
        dataMap.put("appName", this.appName);
        // 生成的token有效时间30分钟
        int EXP_MINUTE = 30;
        return JwtUtil.generateToken(EXP_MINUTE, dataMap);
    }
}
